import axios from '@/libs/api.request'

export const queryUserApi = (data) =>{
  return axios.request({
    url: '/ims-admin/user/query',
    method: 'post',
    data
  })
}

export const modifyUserApi = (data) =>{
  return axios.request({
    url: '/ims-admin/user/modify',
    method: 'post',
    data
  })
}

export const resetPasswordApi = (data) =>{
  return axios.request({
    url: '/ims-admin/user/reset',
    method: 'post',
    data
  })
}

export const addUserApi = (data) =>{
  return axios.request({
    url: '/ims-admin/user/add',
    method: 'post',
    data
  })
}

export const delUserApi = (data) =>{
  return axios.request({
    url: '/ims-admin/user/delete',
    method: 'post',
    data
  })
}

export const maintainApi = (data) =>{
  return axios.request({
    url: '/ims-admin/user/maintain',
    method: 'post',
    data
  })
}

export const maintainRoleApi = (data) =>{
  return axios.request({
    url: '/ims-admin/user/maintain/role',
    method: 'post',
    data
  })
}
export const maintainDeleteRoleApi = (id) =>{
  return axios.request({
    url: '/ims-admin/user/maintain/role/'+id,
    method: 'get'
  })
}
export const maintainSystemApi = (data) =>{
  return axios.request({
    url: '/ims-admin/user/maintain/system',
    method: 'post',
    data
  })
}
export const maintainDeleteSystemApi = (id) =>{
  return axios.request({
    url: '/ims-admin/user/maintain/system/'+id,
    method: 'get'
  })
}